package com.murphy.springmvc.model;

import com.murphy.springmvc.annotation.Desensitization;
import com.murphy.springmvc.enums.DesensitionType;
import java.io.Serializable;

/**
 * @author moqinc
 * @date 2019/12/18 18:14
 * @version 1.0
 */
public class UserDTO implements Serializable {
    @Desensitization(type = DesensitionType.IDENTITYNO)
    private String identityNo;
    private String name;
    private String realname;

    @SuppressWarnings("all")
    public UserDTO() {
    }

    @SuppressWarnings("all")
    public String getIdentityNo() {
        return this.identityNo;
    }

    @SuppressWarnings("all")
    public String getName() {
        return this.name;
    }

    @SuppressWarnings("all")
    public String getRealname() {
        return this.realname;
    }

    @SuppressWarnings("all")
    public void setIdentityNo(final String identityNo) {
        this.identityNo = identityNo;
    }

    @SuppressWarnings("all")
    public void setName(final String name) {
        this.name = name;
    }

    @SuppressWarnings("all")
    public void setRealname(final String realname) {
        this.realname = realname;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UserDTO)) return false;
        final UserDTO other = (UserDTO) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$identityNo = this.getIdentityNo();
        final Object other$identityNo = other.getIdentityNo();
        if (this$identityNo == null ? other$identityNo != null : !this$identityNo.equals(other$identityNo)) return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$realname = this.getRealname();
        final Object other$realname = other.getRealname();
        if (this$realname == null ? other$realname != null : !this$realname.equals(other$realname)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof UserDTO;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $identityNo = this.getIdentityNo();
        result = result * PRIME + ($identityNo == null ? 43 : $identityNo.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $realname = this.getRealname();
        result = result * PRIME + ($realname == null ? 43 : $realname.hashCode());
        return result;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "UserDTO(identityNo=" + this.getIdentityNo() + ", name=" + this.getName() + ", realname=" + this.getRealname() + ")";
    }
}
